home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / CH5 / EMAGA5 BOOK CODE / control / client / client.cs
Encoding:
Text File  |  2006-06-23  |  1.5 KB  |  65 lines

  1. //============================================================================
  2. // control/client/client.cs
  3. //
  4. // This module contains client specific code for handling
  5. // the set up and operation of the player's in-game interface.
  6. //
  7. //  Copyright (c) 2003, 2006 by Kenneth C.  Finney.
  8. //============================================================================
  9.  
  10.  
  11. function LaunchGame()
  12. {
  13.    createServer("SinglePlayer", "control/data/maps/book_ch5.mis");
  14.    %conn = new GameConnection(ServerConnection);
  15.    %conn.setConnectArgs("Reader");
  16.    %conn.connectLocal();
  17. }
  18.  
  19. function ShowMenuScreen()
  20. {
  21.    // Startup the client with the menu...
  22.    Canvas.setContent( MenuScreen );
  23.    Canvas.setCursor("DefaultCursor");
  24. }
  25.  
  26. function SplashScreenInputCtrl::onInputEvent(%this, %dev, %evt, %make)
  27. {
  28.    if(%make)
  29.    {
  30.      ShowMenuScreen();
  31.    }
  32. }
  33.  
  34. //============================================================================
  35. // the following functions are called from the client common code modules
  36. // these stubs are added here to prevent warning messages from cluttering
  37. // up the log file.
  38. //============================================================================
  39. function onServerMessage()
  40. {
  41. }
  42. function onMissionDownloadPhase1()
  43. {
  44. }
  45. function onPhase1Progress()
  46. {
  47. }
  48. function onPhase1Complete()
  49. {
  50. }
  51. function onMissionDownloadPhase2()
  52. {
  53. }
  54. function onPhase2Progress()
  55. {
  56. }
  57. function onPhase2Complete()
  58. {
  59. }
  60. function onPhase3Complete()
  61. {
  62. }
  63. function onMissionDownloadComplete()
  64. {
  65. }